//
//  XDErrProblemHttpModel.m
//  XDEducation
//
//  Created by 星道 on 17/5/15.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "XDErrProblemHttpModel.h"

@implementation XDErrProblemHttpModel

+ (NSArray *)ErrProblemArr
{
    return @[
             [[XDErrProblemFuXi alloc] init],
             [[XDErrProblemKeWai alloc] init],
             [[XDErrProblemQuanNeng alloc] init],
             [[XDErrProblemKeQian alloc] init],
             [[XDErrProblemKeTang alloc] init],
             [[XDErrProblemZuoTi alloc] init]
    ];
}


@end




@implementation XDErrProblemFuXi

- (instancetype)init
{
    self = [super init];
    if (self)
    {
        self.Name = @"复习巩固";
        self.TimeAction = @"gettimesbyuid";
        self.UrlFormat = @"myresult.do";
        self.UrlTimeDetailFormat = @"myresult.do";
        self.Querytime = @"";
        self.TimeDetailAction = @"geterrorcountbytime";
    }
    return self;
}

- (void)SetDict:(NSDictionary *)Dict
{
    self.gradeid = [Dict[@"gradeid"] stringValue];
    self.uniqueKey = Dict[@"unique_key"];
    self.knowledge_id = [Dict[@"knowledge_id"] stringValue];
    self.error_count = [Dict[@"error_count"] stringValue];
    self.question_count = [Dict[@"question_count"] stringValue];
    self.knowledge_name = Dict[@"knowledge_name"];
}
@end

@implementation XDErrProblemKeWai

- (instancetype)init
{
    self = [super init];
    if (self)
    {
        self.Name = @"课外作业";
        self.TimeAction = @"getHomeworkTimesByUid";
        self.TimeDetailAction = @"getErrorCountByTimeHw";
        self.UrlFormat = @"exercise.do";
        self.UrlTimeDetailFormat = @"exercise.do";
        self.Querytime = @"";
    }
    return self;
}
- (void)SetDict:(NSDictionary *)Dict
{
    [self setValuesForKeysWithDictionary:Dict];
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{};
@end

@implementation XDErrProblemQuanNeng

- (instancetype)init
{
    self = [super init];
    if (self)
    {
        self.Name = @"全能星战";
        self.TimeAction = @"getAllStrengthFire";
        self.UrlFormat = @"exercise.do";
    }
    return self;
}

- (void)SetDict:(NSDictionary *)Dict
{
    [self setValuesForKeysWithDictionary:Dict];
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{};
@end

@implementation XDErrProblemKeQian

- (instancetype)init
{
    self = [super init];
    if (self)
    {
        self.Name = @"课前预习";
        self.TimeAction = @"getHomeworkTimesByUid";
        self.UrlFormat = @"exercise.do";
        self.Type = 1;
    }
    return self;
}
- (void)SetDict:(NSDictionary *)Dict
{
    [self setValuesForKeysWithDictionary:Dict];
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{};
@end

@implementation XDErrProblemKeTang

- (instancetype)init
{
    self = [super init];
    if (self)
    {
        self.Name = @"课堂小测";
        self.TimeAction = @"getHomeworkTimesByUid";
        self.UrlFormat = @"exercise.do";
        self.Type = 2;
    }
    return self;
}
- (void)SetDict:(NSDictionary *)Dict
{
    [self setValuesForKeysWithDictionary:Dict];
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{};
@end

@implementation XDErrProblemZuoTi

- (instancetype)init
{
    self = [super init];
    if (self)
    {
        self.Name = @"做题记录";
    }
    return self;
}

@end
